<template>
  <div class="contain">

    <div class="lunboBox">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="brown">
        <van-swipe-item v-for="(val,index) in dataList" :key="index">
          <img :src="val.imgSrc" alt="" />
        </van-swipe-item>
      </van-swipe>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      dataList: []
    }
  },
  mounted () {
    this.request.get('/api/usersswiper')
      .then((res) => {
        this.dataList = res.data
      })
      .catch((err) => {
        console.log(err)
      })
  }
}
</script>

<style scoped>
.contain {
  width: 100%;
  float: left;
}
.lunboBox {
  width: 23rem;
  height: 12rem;
  margin: 3px auto;
  border-radius: 10px;
}
.lunboBox img {
  width: 100%;
  height: 12rem;
  border-radius: 10px;
  color: brown;
}
</style>
